package com.kymatrix.mpo.plus.bpm.server.model.form.category;

import com.kymatrix.mpo.plus.bpm.server.model.entity.definition.BpmCategoryEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

@ApiModel(value = "管理后台 - 列表查询 BPM 流程分类 Response")
@Data
@Accessors(chain=true)
public class ListQueryBpmCategoryResp {

    @ApiModelProperty(value = "分类编号", example = "3167")
    private String id;

    @ApiModelProperty(value = "分类名")
    private String name;

    @ApiModelProperty(value = "分类标志", example = "OA")
    private String code;


    public static ListQueryBpmCategoryResp formEntity(BpmCategoryEntity entity) {
        ListQueryBpmCategoryResp resp = new ListQueryBpmCategoryResp();
        resp.setId(entity.getId());
        resp.setName(entity.getName());
        resp.setCode(entity.getCode());
        return resp;
    }
}
